package com.shuoyue.ycgk.ui.main.adv;

import android.os.Bundle;
import android.widget.ImageView;

import com.shuoyue.ycgk.R;
import com.shuoyue.ycgk.base.BaseMvpFragment;

import butterknife.BindView;

public class FragmentAdv extends BaseMvpFragment {
    @BindView(R.id.img)
    ImageView img;

    Integer resource;


    @Override
    public void initParams(Bundle bundle) {
        resource = bundle.getInt("img");
    }

    public static FragmentAdv getInstance(Integer imgUrl) {
        FragmentAdv fragmentWelcome1 = new FragmentAdv();
        Bundle bundle = new Bundle();
        bundle.putInt("img", imgUrl);
        fragmentWelcome1.setArguments(bundle);
        return fragmentWelcome1;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_welcome_1;
    }

    @Override
    protected void initView() {
        if (resource != null && resource != 0)
            img.setImageResource(resource);
    }
}
